﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Numerics;
using Gameplay.PVE.Survivor;
using UnityEditor;
using UnityEngine;

[CustomEditor(typeof(HpStateDisplay))]
public class HpStateDisplayEditor : Editor
{
    private HpStateDisplay data;

    private void OnEnable()
    {
        data = target as HpStateDisplay;
    }

    public override void OnInspectorGUI()
    {
        if (GUILayout.Button("复制"))
        {
            var mapObstacleData = data.GetComponent<MapObstacleData>();
            if (mapObstacleData)
            {
                data.CopyFromObstacle(mapObstacleData);
            }
        }
        base.OnInspectorGUI();
    }
}